public class dp {

    static int fbnc(int n){
        int help[]=new int[n+1];
        if (n==0){
            help[n]=0;
            return 0;
        }
        if(n==1){
            help[1]=1;
            return 1;
        }
        help[0]=0;
        help[1]=1;
        for (int i = 2; i <= n; i++) {

            help[i]=help[i-1]+help[i-2];
        }
        return help[n];
    }
    public static void main(String[] args) {
        System.out.println(fbnc(5));

    }
}
